package com.atguigu.lease;

import com.atguigu.lease.common.minio.MinioConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/*
    springboot：自动配置原理
    AppWebApplication(启动类 | 配置类 ImportConfiguration) -> @EnableAutoConfiguration | @Import(AutoConfigurationImportSelector.class)
     -> autoconfigure.AutoConfiguration.imports -> string[] -> 返回 -> 自动导入


     springboot 工程组件分为两类加载：1.自动加载(清单文件，第三方框架启动器的内容)2.@ComponentScan扫描的(自定义的配置类)

     报错：初始化minio的配置类

     1.自动加载如何排除
        @SpringBootApplication(exclude = {MinioConfiguration.class})
     2.componentScan扫描如何排除
        @ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {MinioConfiguration.class}))

 */

//@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {MinioConfiguration.class}))

@SpringBootApplication
public class AppWebApplication {
    public static void main(String[] args) {
        SpringApplication.run(AppWebApplication.class,args);
    }
}